<html lang="zh-CN">

<head>
    
    <meta charset="utf-8">
    <title id='title'>Get牛</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,minimum-scale=1, maximum-scale=1.0, user-scalable=no">
    <!-- Site CSS -->
    <link href="http://cdn.bootcss.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
    <link href="http://cdn.bootcss.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
    <link href="http://static.bootcss.com/www/assets/css/site.min.css?v5" rel="stylesheet">
    <style>
    .pagination>li>a, .pagination>li>span {
    padding: 6px 9px;
}
body { padding-bottom: 70px; }
.table>tbody>tr>td { padding: 6px; border-top: 0}
.btn-circle.btn-xl {
  width: 70px;
  height: 70px;
  padding: 10px 16px;
  font-size: 24px;
  line-height: 1.33;
  border-radius: 35px;
} 
    </style>
    
  </head>
  <body>

    <div class="navbar navbar-inverse navbar-fixed-top">
      <div class="container">
        <div class="navbar-header" id='navHead' style="padding-top: 3.5%;" align="center">   
        </div>   
      </div>
    </div>

 
<div id="body" style="padding-top:10px">
<div id = 'pictures' style="padding-top: 20px">
</div>

<input id="fileToUpload" type="file" size="20" name="fileToUpload" class="input">
<button id="buttonUpload">上传</button>
</div>
	 
	
 <nav class="navbar navbar-default navbar-fixed-bottom" style="border: 0;background-color:#000" id="nav_buttom">
  
   <table class="table"bordercolor="#000"style="padding 0px;margin-bottom: 0; "><tr style="padding 0px;"><td style="padding: 12px"><div align="center"><a href="#"class="heading-mao"style="color:#9D9D9D"id="sy">首页</a></div></td><td style="padding: 12px"><div align="center"><a href="#"class="heading-mao"style="color:#9D9D9D"id="bc">想当牛人</a></div></td><td style="padding: 12px"><div align="center"><a href="#"class="heading-mao"style="color:#9D9D9D"id="gr">个人中心</a></div></td></tr></table>
</nav>

   
    
    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="http://cdn.bootcss.com/jquery/1.11.2/jquery.min.js"></script>
    <script src="http://cdn.bootcss.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
    <script src="http://cdn.bootcss.com/unveil/1.3.0/jquery.unveil.min.js"></script>
    <script src="http://cdn.bootcss.com/scrollup/2.4.0/jquery.scrollUp.min.js"></script>
    <script src="http://cdn.bootcss.com/toc/0.3.2/toc.min.js"></script>
    <script src="http://cdn.bootcss.com/jquery.matchHeight/0.5.2/jquery.matchHeight-min.js"></script>
    <script src="http://static.bootcss.com/www/assets/js/site.min.js"></script>
	<script src="http://liveser.cn/js/ajaxfileupload.js"></script>
    <script>
	$(document).ready(function(){
		$.post('http://liveser.cn/getPicture',
		{
			id : 1
		},
		function(data,status)
		{
			json1=eval("("+data+")");
			//alert(json1[0]);
			for(var i =0;i<json1.length;i++)
			{
				$("#pictures").append('<img src="http://liveser.cn/upload_pic/'+json1[i]['pic_name']+'"/>');
				//alert(json1[i]['pic_name']);
			}
		});
	});
	
	$('#fileToUpload').change(function(){
    $.ajaxFileUpload({
        url:'http://liveser.cn/test_upload',//处理图片脚本
        secureuri :false,
        fileElementId :'fileToUpload',//file控件id
        dataType : 'json',
        success : function (data, status){
			alert(data);
            if(typeof(data.error) != 'undefined'){
                if(data.error != ''){
                    alert(data.error);
                }else{
                    alert(data.msg);
                }
            }
        },
        error: function(data, status, e){
            alert(e);
        }
});

});
    
	
	</script>


</body></html>